package com.kafak.springboot.springbootkafka.controller;

import org.apache.kafka.common.serialization.StringDeserializer;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.KafkaListener;

/**
 * ClassName: ConsumerController
 * Description:
 * date: 2023/3/12 17:33
 *  监听kafka信息
 * @author Yee
 * @since JDK 1.8
 */
@Configuration
public class ConsumerController {


    @KafkaListener(topics = "first")
    public void consumerTopic(String msg){
        System.out.println("收到信息:"+msg);
    }
}
